#!/bin/sh

j=`expr 1024 "*" 8`
i=`echo "obase=2; $j" | bc`
m=00$i
echo "$m" 
len=`echo $m|awk '{print length($0)}'` 
L1=`echo $m|awk '{print substr($m,1,4)}'`
L2=`echo $m|awk '{print substr($m,5,8)}'`
L3=`echo $m|awk '{print substr($m,9,12)}'`
L4=`echo $m|awk '{print substr($m,13,16)}'`

echo "$len, $L1$L2$L3$L4"

l1=`echo "obase=16; ibase=2; $L1"|bc`
l2=`echo "obase=16; ibase=2; $L2"|bc`
l3=`echo "obase=16; ibase=2; $L3"|bc`
l4=`echo "obase=16; ibase=2; $L4"|bc`

echo "$l1$l2$l3$l4"
